﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true" CodeFile="Bill.aspx.cs" Inherits="Bill" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>                                
                &nbsp;<asp:Label ID="Label1" runat="server" Text="Service Type"></asp:Label>
                <asp:RadioButton ID="rbtnTopUp" runat="server" AutoPostBack="True" GroupName="ServiceType" Text="TopUp" OnCheckedChanged="rbtnAllSevice_CheckedChanged" />
                <asp:RadioButton ID="rbtnSpecialRecharge" runat="server" AutoPostBack="True" GroupName="ServiceType" Text="SpecialRecharge" OnCheckedChanged="rbtnAllSevice_CheckedChanged" />
                <asp:RadioButton ID="rbtnOther" runat="server" AutoPostBack="True" GroupName="ServiceType" Text="OtherSevice" OnCheckedChanged="rbtnAllSevice_CheckedChanged" />
                <asp:RadioButton ID="rbtnAllSevice" runat="server" AutoPostBack="True" Checked="True" GroupName="ServiceType" Text="All" OnCheckedChanged="rbtnAllSevice_CheckedChanged" />
            
                <br />
                <br />
                <br />
                <asp:Panel ID="panelTopUp" runat="server">
                    <asp:Label ID="lblTopUp0" runat="server" Text="TopUp"></asp:Label>
                    <asp:DropDownList ID="ddlSortTopUp" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSortTopUp_SelectedIndexChanged">
                        <asp:ListItem>DESC</asp:ListItem>
                        <asp:ListItem>ASC</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label8" runat="server" Text="Order By"></asp:Label>
                    <asp:DropDownList ID="ddlOrderByTopUp" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSortTopUp_SelectedIndexChanged">
                        <asp:ListItem Value="_createDate">Create Date</asp:ListItem>
                        <asp:ListItem Value="_paymentDate">PaymentDate</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label9" runat="server" Text="Bill Status"></asp:Label>
                    <asp:DropDownList ID="ddlBillStatusTopUP" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSortTopUp_SelectedIndexChanged">
                        <asp:ListItem Value="0">Unpaid</asp:ListItem>
                        <asp:ListItem Value="1">Paid</asp:ListItem>
                    </asp:DropDownList>
                    <br />
                    <asp:TextBox ID="txtSearchTopUp" runat="server" Width="264px"></asp:TextBox>
                    <asp:DropDownList ID="ddlSearchTopUp" runat="server">
                        <asp:ListItem>CreateDate</asp:ListItem>
                        <asp:ListItem>PaymentDate</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Button ID="btnSearchTopUp" runat="server" OnClick="btnSearchTopUp_Click" Text="Search" />
                    <asp:Button ID="btnShowAllTopup" runat="server" OnClick="btnShowAllTopup_Click" Text="Show All" />
                    <asp:GridView ID="gdvTopUp" runat="server" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="Id_Bill" ForeColor="#333333" GridLines="None" OnPageIndexChanging="gdvTopUp_PageIndexChanging" OnRowUpdating="gdvTopUp_RowUpdating" PageSize="5" Width="880px" ShowHeaderWhenEmpty="True">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:BoundField DataField="Id_Bill" HeaderText="id_Bill" Visible="False" />
                            <asp:BoundField DataField="durationTime" HeaderText="DurationTime" />
                            <asp:BoundField DataField="Denomination" HeaderText="Denomination" />
                            <asp:BoundField DataField="Denomination" HeaderText="Discount" />
                            <asp:BoundField DataField="Total" HeaderText="Total" />
                            <asp:BoundField DataField="CreateDate" HeaderText="CreateDate" />
                            <asp:BoundField DataField="PaymentDate" HeaderText="PaymentDate" />
                            <asp:TemplateField HeaderText="Status">
                                <ItemTemplate>
                                    <asp:Label ID="lblStatusTopUp0" runat="server" Text="Paid" Visible='<%# Convert.ToInt32(Eval("billStatus"))==1?true:false %>'></asp:Label>
                                    <asp:LinkButton ID="lbtnStatusTopUp0" runat="server" CommandName="update" Font-Underline="False" OnClientClick="javascript:return confirm(&quot;Are you want to Paid ?&quot;)" ToolTip="Click to paid this bill" Visible='<%# Convert.ToInt32(Eval("billStatus"))==0?true:false %>'>Unpaid</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <EditRowStyle BackColor="#2461BF" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#EFF3FB" HorizontalAlign="Center" VerticalAlign="Middle" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    </asp:GridView>
                </asp:Panel>
            <p>
            </p>
                <asp:Panel ID="panelSpecialRecharge" runat="server">
                    <asp:Label ID="lblSpecial" runat="server" Text="Special Recharge"></asp:Label>
                    <asp:DropDownList ID="ddlSortSpecialRecharge" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSortSpecialRecharge_SelectedIndexChanged">
                        <asp:ListItem>DESC</asp:ListItem>
                        <asp:ListItem>ASC</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label4" runat="server" Text="Order By"></asp:Label>
                    <asp:DropDownList ID="ddlOrderBySpecialRecharge" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSortSpecialRecharge_SelectedIndexChanged">
                        <asp:ListItem Value="_createDate">Create Date</asp:ListItem>
                        <asp:ListItem Value="_paymentDate">PaymentDate</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label6" runat="server" Text="Bill Status"></asp:Label>
                    <asp:DropDownList ID="ddlBillStatusSpecialRecharge" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSortSpecialRecharge_SelectedIndexChanged">
                        <asp:ListItem Value="0">Unpaid</asp:ListItem>
                        <asp:ListItem Value="1">Paid</asp:ListItem>
                    </asp:DropDownList>
                    <br />
                    <asp:TextBox ID="txtSearchSpecialRecharge" runat="server" Width="264px"></asp:TextBox>
                    <asp:DropDownList ID="ddlSearchSpecialRecharge" runat="server">
                        <asp:ListItem>CreateDate</asp:ListItem>
                        <asp:ListItem>PaymentDate</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Button ID="btnSearchSpecialRecharge" runat="server" OnClick="btnSearchSpecialRecharge_Click" Text="Search" />
                    <asp:Button ID="btnShowSpecialRecharge" runat="server" OnClick="btnShowSpecialRecharge_Click" Text="Show All" />
                    <asp:GridView ID="gdvSpecialRecharge" runat="server" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="Id_Bill" ForeColor="#333333" GridLines="None" OnPageIndexChanging="gdvSpecialRecharge_PageIndexChanging" OnRowUpdating="gdvSpecialRecharge_RowUpdating" PageSize="5" Width="879px">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:BoundField DataField="packageName" HeaderText="Package" />
                            <asp:BoundField DataField="DurationDate" HeaderText="DurationDate" />
                            <asp:BoundField DataField="Total" HeaderText="Total" />
                            <asp:BoundField DataField="Description" HeaderText="Description" />
                            <asp:BoundField DataField="CreateDate" HeaderText="CreateDate" />
                            <asp:BoundField DataField="paymentDate" HeaderText="PaymentDate" />
                            <asp:TemplateField HeaderText="Status">
                                <ItemTemplate>
                                    <asp:Label ID="lblStatusSpecialRecharge" runat="server" Text="Paid" Visible='<%# Convert.ToInt32(Eval("billStatus"))==1?true:false %>'></asp:Label>
                                    <asp:LinkButton ID="lbtnStatusSpecialRecharge" runat="server" CommandName="update" Font-Underline="False" OnClientClick="javascript:return confirm(&quot;Are you want to Paid ?&quot;)" ToolTip="Click to paid this bill" Visible='<%# Convert.ToInt32(Eval("billStatus"))==0?true:false %>'>Unpaid</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Id_Bill" HeaderText="id_Bill" Visible="False" />
                        </Columns>
                        <EditRowStyle BackColor="#2461BF" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#EFF3FB" HorizontalAlign="Center" VerticalAlign="Middle" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    </asp:GridView>
                </asp:Panel>
            <p>
                </p>
                <asp:Panel ID="panelOtherService" runat="server">
                    <asp:Label ID="lblOther" runat="server" Text="Other Service"></asp:Label>
                    <asp:DropDownList ID="ddlSortOtherService" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSortOtherService_SelectedIndexChanged">
                        <asp:ListItem>DESC</asp:ListItem>
                        <asp:ListItem>ASC</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label5" runat="server" Text="Order By"></asp:Label>
                    <asp:DropDownList ID="ddlOrderByOtherService" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSortOtherService_SelectedIndexChanged">
                        <asp:ListItem Value="_createDate">Create Date</asp:ListItem>
                        <asp:ListItem Value="_paymentDate">PaymentDate</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label7" runat="server" Text="Bill Status"></asp:Label>
                    <asp:DropDownList ID="ddlBillStatusOtherService" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSortOtherService_SelectedIndexChanged">
                        <asp:ListItem Value="0">Unpaid</asp:ListItem>
                        <asp:ListItem Value="1">Paid</asp:ListItem>
                    </asp:DropDownList>
                    <br />
                    <asp:TextBox ID="txtSearchOtherRecharge" runat="server" Width="264px"></asp:TextBox>
                    <asp:DropDownList ID="ddlSearchOtherService" runat="server">
                        <asp:ListItem>CreateDate</asp:ListItem>
                        <asp:ListItem>PaymentDate</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Button ID="btnSearchOtherService" runat="server" OnClick="btnSearchOtherService_Click" Text="Search" />
                    <asp:Button ID="btnShowAllOtherService" runat="server" OnClick="btnShowAllOtherService_Click" Text="Show All" />
                    <asp:GridView ID="gdvOtherService" runat="server" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="Id_Bill" ForeColor="#333333" GridLines="None" OnPageIndexChanging="gdvOtherService_PageIndexChanging" OnRowUpdating="gdvOtherService_RowUpdating" PageSize="5" Width="871px">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:BoundField DataField="packageName" HeaderText="Package" />
                            <asp:BoundField DataField="durationDate" HeaderText="DurationDate" />
                            <asp:BoundField DataField="total" HeaderText="Total" />
                            <asp:BoundField DataField="description" HeaderText="Description" />
                            <asp:BoundField DataField="createDate" HeaderText="CreateDate" />
                            <asp:BoundField DataField="paymentDate" HeaderText="PaymentDate" />
                            <asp:TemplateField HeaderText="Status">
                                <ItemTemplate>
                                    <asp:Label ID="lblStatusOtherService" runat="server" Text="Paid" Visible='<%# Convert.ToInt32(Eval("billStatus"))==1?true:false %>'></asp:Label>
                                    <asp:LinkButton ID="lbtnStatusOtherService" runat="server" CommandName="update" Font-Underline="False" OnClientClick="javascript:return confirm(&quot;Are you want to Paid ?&quot;)" ToolTip="Click to paid this bill" Visible='<%# Convert.ToInt32(Eval("billStatus"))==0?true:false %>'>Unpaid</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Id_Bill" HeaderText="id_Bill" Visible="False" />
                        </Columns>
                        <EditRowStyle BackColor="#2461BF" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#EFF3FB" HorizontalAlign="Center" VerticalAlign="Middle" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    </asp:GridView>
                </asp:Panel>
                <p>
                    &nbsp;</p>
            <br />
            <asp:Label ID="lblError" runat="server" ForeColor="#CC0000" Text="Label"></asp:Label>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

